/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package serwer;

import Serializable.ParsedCmd;

/**
 *
 * @author nicra
 */
public class ReParser {
    public static String process(ParsedCmd pC){
        String out="";
        if(pC.mainCmd.isEmpty()) return "";
        if(pC.intParam==null){
            if(pC.stringParam==null){
                out+="-"+pC.mainCmd;
            }else if(pC.stringParam.length==1){
                out+="$"+pC.mainCmd+"^"+pC.stringParam[0];
            }
        }else if(pC.intParam.length==1){
            out+="@"+pC.mainCmd+"^"+Integer.toString(pC.intParam[0]);
        }       
        out+="##";
        return out;
    }
}
